if (!jsx3.lang.Class.forName("tibco.admin.enterpriseAssets.userMgt.permissions.RemovePermissionsSingle")) {


    jsx3.lang.Class.defineClass("tibco.admin.enterpriseAssets.userMgt.permissions.RemovePermissionsSingle",
            jsx3.gui.Dialog,
            null,
            function (permissions) {

                permissions.prototype.initialize = function() {
                    var me = this;
                    this.mtxview = this.getDescendantOfName("mtxView_24_X");
                    this.mtxedit = this.getDescendantOfName("mtxEdit_24_X");
                    this.mtxowner = this.getDescendantOfName("mtxOwner_24_X");
                    this.selectAllBtn = this.getDescendantOfName("btnSelectAll_24_X");
                    this.selectAllBtn.selectAll = function() {
                        me.selectAll();
                    }
                    this.deselectAllBtn = this.getDescendantOfName("btnDeselectAll_24_X");
                    this.deselectAllBtn.deselectAll = function() {
                        me.deselectAll();
                    }
                }


                permissions.prototype.selectAll = function() {
                    this.onSelectAll(this.mtxview);
                    this.onSelectAll(this.mtxedit);
                    this.onSelectAll(this.mtxowner);

                }

                permissions.prototype.deselectAll = function() {
                    this.onDeselectAll(this.mtxview);
                    this.onDeselectAll(this.mtxedit);
                    this.onDeselectAll(this.mtxowner);
                }

                permissions.prototype.onSelectAll = function(mtx) {
                    mtxCache = mtx.getXML();
                    var mycollection = mtxCache.selectNodes("//record");
                    while (mycollection.hasNext()) {
                        mycollection.next().setAttribute("checked", "1");
                    }
                    mtx.repaint();
                }

                permissions.prototype.onDeselectAll = function(mtx) {
                    mtxCache = mtx.getXML();
                    var mycollection = mtxCache.selectNodes("//record");
                    while (mycollection.hasNext()) {
                        mycollection.next().setAttribute("checked", "0");
                    }
                    mtx.repaint();
                }


            });
}
